1. Technical Field
The present invention relates to a method for reverse video playback and a computer-readable medium, particularly to a method for reverse video playback and a computer-readable medium capable of reducing average image latency time.
2. Description of the Related Art
By now, when important event occurs, such as robbery, car accident, thievery . . . etc, monitoring staffs usually need to access relevant surveillance videos to know the situation. To understand the whole event, repeatedly checking the surveillance videos is required by playing the videos forward and backward repeatedly.
However, there are still many problems when playing a video backward. For example, in traditional techniques of playing a video backward, when outputting the third frame from the last is needed, it needs to decode the frames starting from the I-frame to the third frame from the last in the video stream and outputs the decoded third frame from the last. When outputting the fourth frame from the last is needed, it needs to decode the frames starting from the I-frame to the fourth frame from the last again. When the frame number in the video stream is more than a certain number, the aforementioned method takes lots of time and every time users need to wait for a period of time when playing a video backward.
In addition, in the previous example, when all the decoded frames from the I-frame to the third frame from the last are saved to a cache block in advance, the fourth frame from the last in the video stream can be directly outputted from the cache block, so that the time of sequentially decoding the frames from the I-frame to the fourth frame from the last in the aforementioned method is saved. However, the method needs a cache block with a large capacity. When the frames in the video stream exceed a certain number, the capacity of the cache block and the cost of the cache block for executing the method are considerable.